require( "funcsolver" )

local MODULE = {}
	MODULE.Name = "SpeedHack"
	MODULE.Hooks = {}
	
// Variables
	local speed = CreateClientConVar( "PAB_Speed", 5, true, false )
	
// Lets set up SV_Cheats!
	SetConvar( CreateConVar( "sv_cheats", "" ), 1 )
	
// Functions

	function MODULE.CreateConvar( ply, _, arg )
	
		local var = arg[1]
		local num = arg[2]
		
		SetConvar( CreateConVar( var, "" ), num )
		
	end
	concommand.Add( "PAB_CreateConvar", MODULE.CreateConvar )

	concommand.Add( "+pabspeed", function()
		SetConvar( CreateConVar( "host_timescale", "" ), speed:GetInt() )
	end)
	
	concommand.Add( "-pabspeed", function()
		SetConvar( CreateConVar( "host_timescale", "" ), 1 )
	end)
	
// Register

	PAB.Register( MODULE )